//=============================================================================

#pragma once

//=============================================================================

#include "inc/aRenderStatic.h"
#include "inc/aSystem.h"
#include "inc/aWorld.h"

//=============================================================================

enum cursorModes
{
  NORMAL = -128,
  CAMERAROTATE,
};

//=============================================================================

class aEarthQuakeDlg : public CDialog
{
  public:
	  aEarthQuakeDlg(CWnd* pParent = NULL);

	protected:
	  virtual void DoDataExchange(CDataExchange* pDX);
    BOOL PreTranslateMessage(MSG* msg);
    virtual BOOL OnInitDialog();
    bool aeInitRender();
    void aeDrawFrame();
    void aeDrawGrid(unsigned int x, unsigned int y, float step);
	  afx_msg void OnPaint();
    void OnTimer(UINT_PTR timerId);
	  afx_msg HCURSOR OnQueryDragIcon();
	  DECLARE_MESSAGE_MAP()

    //msgs from statics
    LRESULT OnRenderLMD(WPARAM wp, LPARAM lp);
    LRESULT OnRenderLMU(WPARAM wp, LPARAM lp);
    LRESULT OnRenderMM(WPARAM wp, LPARAM lp);
    LRESULT OnRenderRMD(WPARAM wp, LPARAM lp);
    LRESULT OnRenderRMU(WPARAM wp, LPARAM lp);
    LRESULT OnRenderMMD(WPARAM wp, LPARAM lp);
    LRESULT OnRenderMMU(WPARAM wp, LPARAM lp);
    LRESULT OnRenderMWM(WPARAM wp, LPARAM lp);

    //menu
    void onLoadHeightmapTGA();
    void onExit();

    //common
    void aeFillPopUpMenu();

  protected:
	  HICON m_hIcon;
    CMenu mainMenu;
    CRect tmpClipRect;
    CMenu popUp;

  private:
    aRenderStatic staticRender;
    aSystem rendering;
    cursorModes mode;
};
//=============================================================================
